package leetcode_1001_1100;

import java.net.Inet4Address;
import java.util.Arrays;

public class LeeCode_1024 {
    public static void main(String[] args) {

    }
    private static int videoStitching(int[][] clips, int time) {
        int[] dp = new int[time + 1];
        Arrays.fill(dp, Integer.MAX_VALUE - 1);
        dp[0] = 0;
        for (int i = 1; i <= time; i++) {
            for (int[] clip : clips) {
                if (i > clip[0] && i <= clip[1]){
                    dp[i] = Math.min(dp[i], dp[clip[0]] + 1);
                }
            }
        }
        return dp[time] == Integer.MAX_VALUE - 1 ? 0 : dp[time];
    }
}
